/*
 * @Author: AskMeWhy
 * @Date: 2020-12-27 11:58:47
 * @Last Modified by: AskMeWhy
 * @Last Modified time: 2020-12-29 11:37:33
 */
const app = getApp();
const { AskComponent } = app._require("common/index");

Component({
    properties: {
        imgSrc: {
            type: String,
            value: "",
        },
        title:{
            type: String,
            value: "", 
        },
        desc:{
            type: String,
            value: "", 
        },
        itemMap:{
            type:Map,
            value:{}
        }
    },
    data: {
        list:[],
    },
    methods: {

        clickItems(e){
            let  item = this.data.itemMap;
            item.type = "report";
            let new_item = {"source":item};
            item = new_item;
            // console.log(item);

            const userInfo = (app.user && app.user.userInfo) || {};
            wx.navigateTo({
                url: "/pages/home/collection/collection-details/index?formId=" + item.source.formId+"&dataCount="+item.source.dataCount+"&processInstanceId="+item.source.processInstanceId+"&id="+item.source.dataId +"&userId="+userInfo.id+"&goBackLast=true"+"&type=sb_report"+"&current_type=sb_report",
                events:{
                    updateDataAction:()=>{
                        this.$emit("reloadData",{
                        
                        });
                    }
                }
              });

            console.log(this.data.itemMap);
        }


    }

});
